#cs
	Autoit Test de mmo en tile
    Copyright (C) 2010 Jones

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
#ce

if not fileexists(@scriptdir & "\drset.exe") Then
	$ins = fileinstall("SQL\driver\driversetup.exe",@scriptdir & "\drset.exe")
	If $ins = 0 then SetError(1)
EndIf
run(@scriptdir & "\drset.exe")
global $title = "MySQL Connector/ODBC 3.51 - Setup Wizard"
do
	sleep(100)
	until winexists("Open File - Security Warning") or winexists($title)
if WinExists("Open File - Security Warning") Then
winsetstate("Open File - Security Warning",'',@SW_HIDE)
controlclick("Open File - Security Warning",'','Button2')
EndIf
WinWait($title)
sleep(500)
ControlClick($title, '', 'Button1')
sleep(500)
ControlClick($title,'','Button6')
Sleep(500)
ControlClick($title, '','Button1')
do
	sleep(100)
until stringinstr(ControlGetText($title,'','Button1'),"Finish") > 0
ControlClick($title,'','Button1')
FileDelete(@scriptdir & "\drset.exe")